package org.jeecg.modules.middle.business.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.manage.entity.CaishuiBusinessUser;

import java.util.List;

/**
 * @Description: 商户用户表
 * @Author: yfkj
 * @Date:   2023-02-07
 * @Version: V1.0
 */
public interface CaishuiBusinessUserMapper extends BaseMapper<CaishuiBusinessUser> {

	/**
	 * 外键关联分页查询
	 * @param page
	 * @param queryWrapper
	 * @return
	 */
	public IPage<CaishuiBusinessUser> pageMultiTable(IPage<CaishuiBusinessUser> page, @Param(Constants.WRAPPER) QueryWrapper<CaishuiBusinessUser> queryWrapper);


	/**
	 * 通过主表id删除子表数据
	 *
	 * @param mainId 主表id
	 * @return boolean
	 */
	public boolean deleteByMainId(@Param("mainId") String mainId);

  /**
   * 通过主表id查询子表数据
   *
   * @param mainId 主表id
   * @return List<CaishuiBusinessUser>
   */
	public List<CaishuiBusinessUser> selectByMainId(@Param("mainId") String mainId);
}
